<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<h2>User:</h2>
			<strong>User Id:  <c:out value="${user.id}" /></strong><br />
			<c:out value="${user.name}" /><br /> 
			<strong>Login:  </strong><c:out value="${user.login}" /><br /> 
			<strong>Phone:  </strong><c:out value="${user.phone}" /><br /> 
			<strong>Address:  </strong><c:out value="${user.address}" /><br /> 
<h3>Active orders:</h3>
	<table>
	<tr>
		<th>Id</th>
		<th>Book Id</th>
		<th>Start date</th>
		<th>Return date</th>
	</tr>
	<c:forEach var="record" items="${orders}">
		<tr>
			<td><c:out value="${record.id}" /></td>
			<td><c:out value="${record.book.id}" /></td>
			<fmt:formatDate value="${record.startDate}" var="startDate" pattern="dd/MM/yyyy" />
			<td><c:out value="${startDate}" /></td>
			<fmt:formatDate value="${record.returnDate}" var="returnDate" pattern="dd/MM/yyyy" />
			<td><c:out value="${returnDate}" /></td>
			<td><a href='<spring:url value="/admin/income?order_id=${record.id}" htmlEscape="true" />'>Return</a></td>
		</tr>
	</c:forEach>
</table>
